home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 5
/
Gold Medal Software - Volume 5 (Gold Medal) (1995).iso
/
utils1
/
boot13.arj
/
BOOT.BAT
next >
Wrap
DOS Batch File
|
1992-09-23
|
4KB
|
138 lines
@echo off
echo off
echo BOOT Utility 1.03
echo FreeWare but Copyright 1992 by Unique Software, All Rights Reserved
echo ===================================================================
if "%1"=="" goto helponly
for %%d in (name NAME Name n N) do if "%1"=="%%d" goto name
for %%d in (save SAVE Save s S) do if "%1"=="%%d" goto save
for %%d in (init INIT Init i I) do if "%1"=="%%d" goto init
for %%d in (list LIST List l L) do if "%1"=="%%d" goto list
for %%d in (delete DELETE Delete del DEL Del d D) do if "%1"=="%%d" goto delete
if exist \boot\%1.aut goto bootit
@echo off
echo E R R O R
echo First Parameter "%1" not "name", "save", or existing Boot Pair Name
echo
:helponly
echo BOOT init (initalize for BOOT.BAT to work)
echo
echo BOOT name (reports current Boot Pair Name)
echo BOOT name set [Name] (sets current Boot Pair Name to [Name])
echo (adds line "BOOTNAME=(name) to end of AUTOEXEC.BAT)
echo
echo BOOT save (no parameters - updates (saves) current Boot Pair with curent Name)
echo BOOT save [Name] (sets current Boot Pair Name to [Name] then saves Pair)
echo
echo BOOT list (lists names of boot pairs - *.aut)
echo
echo BOOT delete [name] (deletes named pair after verification)
echo
echo BOOT [Name] (reBoots computer to Boot Pair [Name] set)
echo (first letter abbreviations are valid i-n-s-l-d)
echo -(1) Prepare AUTOEXEC.BAT and CONFIG.SYS to work as you wish
echo --(2) BOOT NAME SET (name) - give the set a name
echo ---(3) BOOT SAVE - save the set
echo ----(4) BOOT (name) - boots with any existing nameD set
goto quit
:init
if exist \Boot\nul goto init1
echo Directory "\BOOT" will be used by BOOT to store Boot Pairs. To stop
echo creation of "\BOOT" press ^C now. Any other key will continue with
echo creation and contination of BOOT.
md \Boot
:init1
if exist wBoot.com goto copyBoot
if exist \boot\wboot.com goto init2
echo WBOOT.COM (supplied with BOOT10.ZIP) not located.
echo WBOOT.COM must be located in the current directory before BOOT.BAT
echo can continue. BOOT.BAT will move WBOOT.COM to the \BOOT directory.
goto quit
:copyBoot
copy WBOOT.COM \BOOT
:init2
if exist wboot.com del wboot.com
if exist yorn.com goto copyyorn
if exist \boot\yorn.com goto init3
echo YORN.COM (supplied with BOOT10.ZIP) not located.
echo YORN.COM must be located in the current directory before BOOT.BAT
echo can continue. BOOT.BAT will move YORN.COM to the \BOOT directory.
goto quit
:copyyorn
copy YORN.COM \BOOT
:init3
if exist yorn.com del yorn.com
echo "BOOT.BAT initialized"
goto quit
:list
dir \boot\*.aut /w
goto quit
:delete
:boot delete name
if exist \boot\%2.aut goto ck2delete
echo "%2" Boot Pair Set Not Found
dir \boot\*.aut /w
goto quit
:ck2delete
echo Verify Delete "%2.aut" and "%2.con" ?
\boot\yorn
if errorlevel=1 goto ck3delete
goto quit
:ck3delete
del \boot\%2.aut
if exist \boot\%2.con del \boot\%2.con
if %2==%bootname% set bootname=
goto quit
:save
if "%2"=="" goto ck2save
echo Create New Boot Pair "%1.AUT" and "%1.CON" ?
\boot\yorn
if errorlevel=1 goto ck1save
goto quit
:ck1save
set BOOTNAME=%2
:ck2save
if not %BootName%=="" goto save1ok
echo BOOT Pair Set not Named
echo SET with BOOT NAME SET [Name] or BOOT SAVE [Name]
goto quit
:save1ok
if not exist \Boot\%BootName%.con goto save2ok
echo "%BootName%" Pair Name exists...overwrite them?
\Boot\yorn
if errorlevel=1 goto save2ok
goto quit
:save2ok
copy \autoexec.bat \Boot\%BootName%.aut
copy \config.sys \Boot\%BootName%.con
echo BOOT Pair saved as "%bootname%.aut" and "%bootname%.con"
goto quit
:name
if not "%3"=="" goto ck1name
if "%2"=="" goto ck2name
echo BOOT Pair Name not specified
goto ck2name
:ck1name
for %%d in (set SET Set s S) do if "%2"=="%%d" goto ck3name
goto ck2name
:ck3name
set BOOTNAME=%3
echo SET BOOTNAME=%3 >> \autoexec.bat
:ck2name
echo BOOT Pair Name is "%BootName%"
goto quit
:bootit
cd \Boot
copy %1.aut \autoexec.bat
copy %1.con \config.sys
\boot\wboot
:quit
echo